
clear 

use "$P_Data_Processed/monthly_station_data_e5_merged.dta"

 
 ** pooled 
 
 gener monop= 0
replace monop = 1 if n_act_stations==1

gener treat_non_monop = treat*(1-monop)
gener share_others_treated_non_monop = share_others_treated*(1-monop)

label variable treat_non_monop "Adopter $\times$ Post Adoption $\times$ Non-Monopolist" 

ivreghdfe mean_wh_margin  mkt_n_stations n_mkt_compet_adopt l_gdp pop_density med_age employed_share l_pop n_brand mean_temp sd_temp mean_precip sd_precip n_act_stations  (treat treat_non_monop = share_others_treated share_others_treated_non_monop) if year<2019, absorb(year_month#monop StID) cluster(mktid) 
 outreg2 using "$P_Tables/Table_G11",  tex(frag) dec(3) label nor2 replace  keep(treat treat_non_monop) 
 
ivreghdfe mean_price  mkt_n_stations n_mkt_compet_adopt l_gdp pop_density med_age employed_share l_pop n_brand mean_temp sd_temp mean_precip sd_precip n_act_stations  (treat treat_non_monop = share_others_treated share_others_treated_non_monop) if year<2019, absorb(year_month#monop StID) cluster(mktid) 
 outreg2 using "$P_Tables/Table_G11",  tex(frag) dec(3) label nor2 append  keep(treat treat_non_monop) 
 